﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zhy.DigitaPlatform.Models
{
    /// <summary>
    /// 点位配置信息模型类
    /// </summary>
    public class VariableModel : ObservableObject
    {
        /// <summary>
        /// 唯一编码
        /// </summary>
        public string VarNum { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string VarName { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string VarAddress { get; set; }
        /// <summary>
        /// 读取返回数据
        /// </summary>
        private object _value;
        /// <summary>
        /// 读取返回数据
        /// </summary>
        public object Value
        {
            get { return _value; }
            set { Set(ref _value, value); }
        }
        /// <summary>
        /// 偏移量
        /// </summary>
        public double Offset { get; set; }
        /// <summary>
        /// 系数
        /// </summary>
        public double Modulus { get; set; } = 1;
        /// <summary>
        /// 组件属性的数据类型
        /// </summary>
        public string VarType { get; set; } = "UInt16";
    }
}
